# vim:ts=4:sw=4:noet:
""" Robot Info dialog """

import wx

class GetInfoRobotDialog(wx.Dialog):
	def __init__(self, parent, title):
		wx.Dialog.__init__(self, parent, -1, title)

		self.lblHdrVersion = wx.StaticText(self, -1, "Version")
		self.lblVersion = wx.StaticText(self, -1, "")
		self.lblHdrPlatform = wx.StaticText(self, -1, "Platform")
		self.lblPlatform = wx.StaticText(self, -1, "")
		self.lblHdrMemory = wx.StaticText(self, -1, "Memory Used")
		self.lblMemory = wx.StaticText(self, -1, "")
		
		self.__set_properties()
		self.__do_layout()
	
	def __set_properties(self):
		ft = self.lblVersion.GetFont()
		newft = wx.Font(ft.GetPointSize(), wx.DECORATIVE, wx.NORMAL, wx.BOLD, 0, ft.GetFaceName())
		self.lblHdrVersion.SetFont(newft)
		self.lblHdrPlatform.SetFont(newft)
		self.lblHdrMemory.SetFont(newft)

	def __do_layout(self):
		self.mainSizer = wx.BoxSizer(wx.VERTICAL)
		grid_sizer_1 = wx.FlexGridSizer(2, 2, 5, 5)
		grid_sizer_1.Add(self.lblHdrVersion, 0, wx.ALIGN_RIGHT, 0)
		grid_sizer_1.Add(self.lblVersion, 0, wx.EXPAND, 0)
		grid_sizer_1.Add(self.lblHdrPlatform, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
		grid_sizer_1.Add(self.lblPlatform, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
		grid_sizer_1.Add(self.lblHdrMemory, 0, wx.ALIGN_RIGHT, 0)
		grid_sizer_1.Add(self.lblMemory, 0, wx.EXPAND, 0)
		self.mainSizer.Add(grid_sizer_1, 0, wx.ALL|wx.EXPAND, 10)
		self.SetSizer(self.mainSizer)
		self.mainSizer.Fit(self)
		self.Layout()

	def fit(self):
		self.SetMinSize(self.mainSizer.GetMinSize())
		self.Fit()
		self.Center()
